{% extends 'base_project.html' %}

{% block title %}{{ project }} - Open Issues{% endblock title %}

{% block content %}
<h2>Browse Issues</h2>
{% if issues.object_list %}
{% for issue in issues.object_list %}
<h3><a href="{{ issue.get_absolute_url }}">{{ issue }}</a></h3>
<ul>
<li>Status: {{ issue.status }}</li>
<li>Created by <a href="{{ issue.creator.get_absolute_url }}">{{ issue.creator }}</a></li>
{% if issue.urgency %}<li>{{ issue.urgency }}</li>{% endif %}
{% if issue.importance %}<li>{{ issue.importance }}</li>{% endif %}
</ul>
<p>{{ issue.description|truncatewords:10 }}</p>
{% endfor %}
{% else %}
<p>There are no open issues for this project.</p>
{% endif %}
<p><a href="{% url create_issue project.slug %}">Report an issue</a></p>
{% endblock %}

{% block pagination_nav %}
{% with issues as objects %}{% include '_pagination_nav.html' %}{% endwith %}
{% endblock %}